﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Layouts/Administration.Master" Inherits="System.Web.Mvc.ViewPage<FacialClub.Helpers.PaginatedListCollection<FacialClub.Models.Entities.NewsEvent>>" %>
<%@ Import Namespace="FacialClub.Helpers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table width="100%">
        <tr>
            <td align="left">
                <b>Title
            </b>
            </td>
            <td>
                <b>PostedDate
            </b>
            </td>
            <td>
                <b>IsActive
            </b>
            </td>
            <td>
                <b>User Created
            </b>
            </td>
            <td>
                <b>Created Date
            </b>
            </td>
            <td>
                <b>Actions
            </b>
            </td>

        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink(item.Title, "Details", new { id = item.NewsEventId })%>
            </td>
            <td>
                <%: String.Format("{0:g}", item.PostedDate)%>
            </td>
            <td>
                <%: item.IsActive%>
            </td>
            <td>
                <%: item.UserCreated%>
            </td>
            <td>
                <%: item.CreatedDate%>
            </td>
            <td>
                <table>
                <tr>
                <td><%: Html.CustomActionLink("Edit", "NewsEvent", new { id = item.NewsEventId }, "/Content/images/edit_icon.png", "Edit")%></td>
                <td><%: Html.CustomActionLink("Delete", "NewsEvent", new { id = item.NewsEventId }, "/Content/images/delete_icon.png", "Delete")%></td>
                </tr>
                </table>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

